﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shell.DomainDot;
using Framework.Poco;

namespace Framework.Domain
{
    public class HotelHallContext : DomainDotBase<Hotel>
    {
        public WithMany<HotelHall> HotelLobbies { private get; set; }

        public WithAll<HotelHallCreator, HotelHall> HotelHallBelonged { private get; set; }

        public void Create(HotelHall hotelHall, Guid serviceCostIdentity, Guid consumptionClassIdentity, HotelHallNextYear prices)
        {
            var instance = this.HotelHallBelonged.Create(hotelHall);
            instance.BindConsumptionClass(consumptionClassIdentity);
            instance.BindServiceCost(serviceCostIdentity);
            instance.CreateHotelHallNextYear(prices);
        }
    }
}
